#pragma once

#include "GameObject.h"
#include "Sprite.h"

struct InfoButton
{
	int x;
	int y;
	int width;
	int height;
};

class MenuButton : public GameObject
{
public:

	MenuButton(void(*function)(), Sprite &_sprite_button, const int &_idSpite, SDL_Renderer* pRenderer);
	virtual ~MenuButton();

	virtual void update();
	virtual	void draw();
	virtual void clean();

	// reset button

	virtual void getButtonDown();

protected:
private:

	bool moveMouse = true;
	InfoButton m_infoButton;
	Sprite m_sprite_menu_button;
	// check button down
	bool m_bButtonDown;
	int m_idSprite;

	SDL_Renderer* m_pRendere;
	SDL_Texture* m_textureButton;

	bool m_bReleased;
	void(*m_function)();
};